<center><i class="layui-icon layui-icon-loading-1 layui-icon layui-anim layui-anim-rotate layui-anim-loop" style="font-size: 48px;"></i></center>
<script type="text/html" template lay-url="{{ layui.setter.baseUrl }}sale/videodata?mid={{ d.params.member_id }}&sale_id={{ d.params.sale_id }}" 
lay-done="layui.form.render(null, 'component-form-videodata');">
  <div id="videodatabox"></div>
  <center style="color:#FF5722">请先在“视频记录”页面手动更新统计数据！</center>
  {{# layui.each(d.data, function(index, item){ }}
  {{# var video=JSON.parse(item.video) }}
    <div class="layui-card">
        <div class="layui-card-header">视频标题：<a href="{{ item.videopath }}" target="_blank" style="color:#06c;">{{ video.title }}</a>&nbsp;⬅点击查看视频</div>
        <div class="layui-card-body">
          <p>最近30天平均播放时长：<strong class="avg_play_duration">{{ item.avg_play_duration }}</strong></p>
          <p>最近30天评论数：<strong class="total_comment">{{ item.total_comment }}</strong></p>
          <p>最近30天点赞数：<strong class="total_like">{{ item.total_like }}</strong></p>
          <p>最近30天播放次数：<strong class="total_play">{{ item.total_play }}</strong></p>
          <p>最近30天分享数：<strong class="total_share">{{ item.total_share }}</strong></p>
        </div>
    </div>
  {{# }); }}
</script>
<style>
  #LAY-popup-sale-video-data {background-color: #F0F0F0;}
</style>
<script>
  layui.use(['admin', 'form', 'upload', 'laydate', 'layedit', 'laytpl'], function(data){
      var $ = layui.$
      ,admin = layui.admin
      ,view = layui.view
      ,element = layui.element
      ,layer = layui.layer
      ,laydate = layui.laydate
      ,form = layui.form
      ,upload = layui.upload
      ,layedit = layui.layedit
      ,laytpl = layui.laytpl;
      var siv = setInterval(function(){
        if($('#videodatabox').length > 0){
          $('.layui-icon-loading-1').hide();
          clearInterval(siv);
        }
      }, 200);
  });
</script>